class Robot2 extends Thread {

	private int donguSayisi;

	@Deprecated
	public Robot2(String isim, int donguSayisi) {
		super(isim);
		this.donguSayisi = donguSayisi;
	}

	public void run() {
		try {
			if (donguSayisi == 0) {
				return; // is parcacigini sonlandir.
			}
			for (int i = 0; i < donguSayisi; i++) {
				System.out.println(this.getName() + "-->" + i);
			}
		} catch (Exception ex) {
			System.out.println("Hata olustu -->" + ex);
		}
	}
}

public class OrnekUc {

	public static void main(String args[]) {

		Robot2 r1 = new Robot2("A", 2);
		Robot2 r2 = new Robot2("B", 3);
		Robot2 r3 = new Robot2("C", 3);
		Robot2 r4 = new Robot2("D", 2);

		r1.start(); // dikkat
		r2.start(); // dikkat
		r3.start(); // dikkat
		r4.start(); // dikkat
	}
}
